package com.shoulei.designpattern.interpreterPattern;

/**
 * @ClassName:TerminalExpress
 * @Descrition:
 * @Author:shoulei
 * @Date:2019/4/14 17:56
 * @Verson:
 */
public class TerminalExpress implements Expression {
    private String data;

    public TerminalExpress(String data) {
        this.data = data;
    }

    @Override
    public boolean interpret(String context) {
        if(context.contains(data)){
            return true;
        }
        return false;
    }
}
